﻿#region Copyright & License
//
// Copyright 2002-2011 MKCL
// Author : Ajit Jagtap
// Date : 1 July 2011
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.mkcl.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.Collections;

using log4net;
using NHibernate;

using Spring.Context.Support;
using KpBusiness.Service;
using KpBusiness.Layer;
using KpBusiness.Model;

namespace KpBusiness
{
  
    public sealed class Program
    {
        private static readonly ILog log = LogManager.GetLogger("KpBusiness");
        
        private Program()
        {

        }
        public static void Main()
        {
            log.Debug("Started");
            DataAccessLayerHelper.GenerateSchema();

            ///Add Default Role

            Role role = new Role();
            role.RoleName = "Admins";
            role.IsActive = true;
            role.LastUpdatedUser ="System";
            role.LastUpdatedDate = DateTime.Now;
            role.GroupType = GroupTypes.Admin;

            RoleService roleService = new RoleService();
            roleService.SaveRole(role);

            


        }

        
    }
}
